home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
Jogos de Azar
/
599.swf
/
scripts
/
frame_168
/
DoAction.as
Wrap
Text File
|
2006-01-17
|
3KB
|
146 lines
win = "0";
hando = hand;
call("sortHand");
y = "0";
while(y < "5")
{
set("a" add y,"0");
y += "1";
}
npair = "0";
i = "0";
while(i < "5")
{
k = i + "1";
while(k < "5")
{
if(hand.substr(i * "3" + "1","1") eq hand.substr(k * "3" + "1","1"))
{
if(!firstTime)
{
if(eval("a" add i) != "1")
{
tellTarget("/hold" add (i + "1"))
{
gotoAndPlay(2);
}
set("a" add i,"1");
}
if(eval("a" add k) != "1")
{
tellTarget("/hold" add (k + "1"))
{
gotoAndPlay(2);
}
set("a" add k,"1");
}
}
npair += "1";
}
k += "1";
}
i += "1";
}
col = hand.substr("2","1");
k = "1";
i = "1";
while(i < "5")
{
if(col ne hand.substr(i * "3" + "2","1"))
{
k = "0";
i = "5";
}
i += "1";
}
col = k;
i = "0";
str = "";
while(i < "5")
{
str = str add hand.substr(i * "3" + "1","1");
i += "1";
}
lflush = "0";
gflush = "0";
if(str eq "23456" or str eq "34567" or str eq "45678" or str eq "56789" or str eq "67890" or str eq "7890A" or str eq "890AV" or str eq "90AVD")
{
lflush = "1";
}
else if(str eq "0AVDK")
{
gflush = "1";
}
verdict = "";
if(col)
{
if(gflush)
{
win = eval("afis:rflush");
verdict = "rflush";
}
else if(lflush)
{
win = eval("afis:rstrflush");
verdict = "rstrflush";
}
else
{
win = eval("afis:colour");
verdict = "colour";
}
}
else if(gflush or lflush)
{
win = eval("afis:flush");
verdict = "flush";
}
else if(npair == "1")
{
win = eval("afis:onepair");
verdict = "onepair";
}
else if(npair == "2")
{
win = eval("afis:twopair");
verdict = "twopair";
}
else if(npair == "3")
{
win = eval("afis:threeokind");
verdict = "threeokind";
}
else if(npair == "4")
{
win = eval("afis:full");
verdict = "full";
}
else if(npair == "6")
{
verdict = "poker";
win = eval("afis:poker");
}
if(verdict ne "")
{
action = "YOU WIN: " add win;
status = action;
}
else if(firstTime)
{
action = "YOU HAVE NOTHING...TRY AGAIN";
status = action;
}
hand = hando;
if((col or gflush or lflush) and !firstTime)
{
i = "0";
while(i < "5")
{
tellTarget("/hold" add (i + "1"))
{
nextFrame();
}
i += "1";
}
}